package com.cuit.zuke.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cuit.zuke.system.entity.SysLoginLogEntity;
import com.cuit.zuke.common.vo.WeeklyDataVo;
import com.cuit.zuke.system.entity.vo.LoginLogVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @program: zuke
 * @description: 登录日志
 * @author: KamTang
 * @create: 2022-04-07 21:10
 **/
public interface SysLoginLogDao extends BaseMapper<SysLoginLogEntity> {
    /**
     * 用户登入报表
     * @param username username
     * @return
     */
    List<Map<String,Object>> userLoginReport(@Param("username") String username);

    /**
     * 获取近一周管理员登录情况
     * @return DailyAdminDataVo
     */
    List<WeeklyDataVo> getWeeklyAdminLoginData();

    /**
     * 获取上次登录信息
     * @param username 用户名字
     * @return LoginLogVO
     */
    List<LoginLogVO> getLastLoginInfo(@Param("username") String username);

}
